package cn.itsource.web.controller;

import cn.itsource.domain.User;
import cn.itsource.feignclients.MyFeignClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class OrderController {

    @Autowired
    private MyFeignClient myFeignClient;
    @GetMapping("/order/user/{id}")
    public User getUserById(@PathVariable("id") Long id){
        return myFeignClient.getUserById(id);
    }
}
